package com.heima;

import lombok.Data;

@Data
public class Result<T> {

    private Integer code;
    private String msg;
    private T data;

    public Result(Integer code, String msg, T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public static<T> Result<T> success(Integer code,String msg,T data){
        return new Result<T>(code,msg,data);
    }

    public static<T> Result<T> error(Integer code,String msg,T data){
        return new Result<T>(code,msg,data);
    }


}
